<?php 
namespace Wanhu\Model;
use Think\Model;
class PrizeModel extends Model 
{
    public function setPrizeNum($id, $num)
    {
        $where = array(
            'id'     => $id,
        );
        $save = array(
            'num'   => $num
        );
        return $this->where($where)->save($save);
    }
    public function getPrizeList()
    {
        $field = array(
            'id',
            'num',
            'lucknum',
            'name'
        );
        return $this->field($field)->select();
    }
    public function getIdPrize($id)
    {
        $where = array(
            'id'     => $id,
        );
        $field = array(
            'num',
            'name'
        );
        return $this->where($where)->field($field)->find();
    }
}
